#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n;
    cin >> n;

    int maxv = -1, idx = 0;

    for(int i = 1, x; i <= n; i ++){
        cin >> x;
        if(x > maxv){
            maxv = x;
            idx = i;
        }
    }
    cout << idx << '\n';


    return 0;
}